import Vue from 'vue'
import VueRouter from 'vue-router'
const originalPush = VueRouter.prototype.push
VueRouter.prototype.push = function (location) {
    return originalPush.call(this, location).catch(err => { 
        console.log(err);
    })
}
Vue.use(VueRouter)
const routes = [
    {
        path: '/',
        redirect: '/home'
    },
    {
        path: '/home',
        component: () => import('../views/Home/home.vue')
    },
    {
        path: '/zx',
        component: () => import('../views/Home/zx.vue')
    },
    {
        path: '/detail',
        component: () => import('../views/Home/detail.vue')
    }

]

const router = new VueRouter({
    routes
});

  
export default router